package com.jiamao.goplay.ui.user.vm;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.base.MultiItemViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

public class ReportPhotorItemVM extends MultiItemViewModel {

    public ObservableField<String> imgUrl = new ObservableField<>("");

    public ReportPhotorItemVM(@NonNull BaseViewModel viewModel, String img) {
        super(viewModel);
        imgUrl.set(img);
    }

    public void showPhoto(int position){
        if (viewModel instanceof AnonymousReportVM ){
            ((AnonymousReportVM)viewModel).uc.showPhoto.setValue(position);
        }else {
            ((AnonymousReportOtherVM)viewModel).uc.showPhoto.setValue(position);
        }

    }
    //条目的点击事件
    public BindingCommand itemClick = new BindingCommand(new BindingAction() {
        @Override
        public void call() {

           // viewModel.startContainerActivity(UserEditUserInfoFragment.class.getCanonicalName());
        }
    });




}
